﻿using System;
using DevExpress.Web.ASPxScheduler;

public class ScheduleAppointmentFormTemplateContainer: AppointmentFormTemplateContainer 
{
    public ScheduleAppointmentFormTemplateContainer(ASPxScheduler control)
		: base(control) 
    {
	}
	
    #region Properties
	
    public int? IdContact
    {
        get
        {
            var fieldValue = Appointment.CustomFields["IdClient"];
            return (fieldValue == DBNull.Value) ? null : (int?)Convert.ToInt32(fieldValue);
        }
    }
	
    public double IdClient 
    { 
		get 
        { 
			var fieldValue = Appointment.CustomFields["IdClient"]; 
			return (fieldValue == DBNull.Value) ? 0 : Convert.ToDouble(fieldValue);
		} 
	}

	#endregion
}
